package com.test.springboot.alicloudoss.service;

import com.aliyun.oss.model.OSSObjectSummary;
import com.test.springboot.alicloudoss.pojo.AlicloudOssPojo;
import org.springframework.web.multipart.MultipartFile;
import java.io.*;
import java.util.List;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/8/10 19:24
 * @package com.test.springboot.alicloudoss.service.impl
 * @description 文件说明
 */

public interface AlicloudOssService {
    /**
     * @desc 文件上传
     * 文档链接 https://help.aliyun.com/document_detail/84781.html?spm=a2c4g.11186623.6.749.11987a7dRYVSzn
     */
     AlicloudOssPojo upload(MultipartFile file, String filePath);

    /**
     * @desc 查看文件列表
     * 文档链接 https://help.aliyun.com/document_detail/84841.html?spm=a2c4g.11186623.2.13.3ad5b5ddqxWWRu#concept-84841-zh
     */
     List<OSSObjectSummary> list() ;

    /**
     * @desc 删除文件
     * 文档链接 https://help.aliyun.com/document_detail/84842.html?spm=a2c4g.11186623.6.770.4f9474b4UYlCtr
     */
     AlicloudOssPojo delete(String fileName) ;

    /**
     * @desc 下载文件
     * 文档链接 https://help.aliyun.com/document_detail/84823.html?spm=a2c4g.11186623.2.7.37836e84ZIuZaC#concept-84823-zh
     */
     void exportOssFile(OutputStream os, String fileName) throws IOException ;
}
